


public class Block {
	int my_x;
	int my_y;
	int my_id;
	public Block(int x,int y, int id){
		my_x = x;
		my_y = y;
		my_id = id;
	}
	public int getX() {
		return my_x;
	}
	public void setX(int x) {
		my_x = x;
	}
	public int getY() {
		return my_y;
	}
	public void setY(int y) {
		my_y = y;
	}
	public void moveDown(){
		my_y++;
	}
	public void moveLeft(){
		my_x++;
	}
	public void moveRight(){
		my_x--;
	}
	public int getId() {
		return my_id;
	}
	public void setId(int id) {
		my_id = id;
	}
	@Override
	public boolean equals(Object o){
		Block b;
		if(o instanceof Block){
			b = (Block)o;
			if(this.my_x != b.getX()){
				return false;
			}else if(this.my_y != b.getY()){
				return false;
			}else{
				return true;
			}
		}else {
			return false;
		}
	}
}
